<?php

namespace App\Http\Controllers\YApi;

//use Illuminate\Http\Request;
use Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;

use Session;
use Redirect;

use App\Models\UsersReg;
use App\Models\UsersFollow;

class GuanzhulistController extends Controller
{

  	public function guanzhulist($uid)
  	{
		// 获得关注会员列表
		$pre_page = 15;
		$guanzhus = UsersFollow::where('fans_uid', $uid)->paginate($pre_page);


		foreach($guanzhus as $guanzhu)
		{
			$guanzhu['users'] = UsersReg::find($guanzhu->friend_uid);
		}

		return $guanzhus;
    }
    
}